<?php


namespace app\zmt\validate;


use think\Validate;

class BannerValidate extends  Validate
{
    //验证规则
    public $rule = [
        'url' => 'require',
        'image' => 'require',
    ];
    //验证提示信息
    public $message = [
        'url.require' => '跳转链接不能为空',
        'image.require' => '图片不能为空',
    ];
    //验证场景
    public $scene = [
        'add' => ['url', 'image'],
        'edit' => ['url', 'image'],
    ];
}